﻿<Window x:Class="Huseyint.Windows7.WPF.Demo.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:win7="http://huseyint.com/windows7/2009/taskbar"
        Title="Windows 7 Managed Taskbar Extensions Demo" Width="480" Height="320"
        WindowStartupLocation="CenterScreen" Icon="/WPFDemo;component/Images/GenericApplication.png">

    <win7:TaskbarExtensions.TaskbarButton>
        <win7:TaskbarButton OverlayIcon="{Binding OverlayIcon}"
                            ProgressState="{Binding ProgressState}"
                            ProgressValue="{Binding ProgressValue}"
                            ProgressValueTotal="{Binding ProgressValueTotal}"
                            ThumbnailBarButtons="{Binding ThumbnailBarButtons}">
        </win7:TaskbarButton>
    </win7:TaskbarExtensions.TaskbarButton>
    
    <Window.Resources>
        <ObjectDataProvider MethodName="GetValues" ObjectType="{x:Type sys:Enum}" x:Key="progressStates">
            <ObjectDataProvider.MethodParameters>
                <x:Type TypeName="win7:ProgressState" />
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
        
        <Style TargetType="{x:Type Button}">
            <Setter Property="Height" Value="21" />
            <Setter Property="Margin" Value="3" />
        </Style>
    </Window.Resources>

    <StackPanel Margin="4">
        <GroupBox Header="Overlay Icons:">
            <StackPanel Orientation="Horizontal">
                <Label>Icon:</Label>
                <ComboBox ItemsSource="{Binding OverlayIcons}" SelectedItem="{Binding OverlayIcon}"
                      VerticalAlignment="Center" HorizontalAlignment="Left" Width="120">
                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <DockPanel LastChildFill="True">
                                <Image Source="{Binding Icon}" Width="16" Height="16" DockPanel.Dock="Left" />
                                <TextBlock Text="{Binding AccessibilityText}" />
                            </DockPanel>
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
                </ComboBox>
            </StackPanel>
        </GroupBox>
        
        <GroupBox Header="Progress States:">
            <StackPanel Orientation="Horizontal">
                <Label>State:</Label>
                <ComboBox ItemsSource="{Binding Source={StaticResource progressStates}}" 
                          SelectedItem="{Binding ProgressState}"
                          VerticalAlignment="Center" HorizontalAlignment="Left" Width="120" />
                <Button Command="{Binding SimulateProgressStatesCommand}">Simulate Progress States</Button>
            </StackPanel>
        </GroupBox>
        
        <GroupBox Header="Thumbnail Toolbar Buttons:">
            <StackPanel Orientation="Horizontal">
                <Button Command="{Binding UpdateThumbBarButtonsCommand}">Update Thumbnail Bar Buttons</Button>
            </StackPanel>
        </GroupBox>
    </StackPanel>
</Window>